<?php

// ##############################################################################||
// #                                                                 
// #   MySmartBB Version 1.7.0	                                      
// #   http://www.MySmartBB.com                                      
// #   Copyright (c) 2008 by MySmartBB team                           
// #   license http://opensource.org/licenses/gpl-license.php GNU Public License
// #                                                             
// #   filename : announcements.php                                           
// #   show announcements                                         
// #                                                                  
// ##############################################################################||

// ** General definitions **

     define('NOT_IN_INDEX',0);
     include('common.php');

// ** announcements **

     if ($_GET['index'] == 1)
     {
         $id = intval($_GET['id']);

         $announcemet_query = $DB->sql_query("SELECT * FROM " . $db_prefix . "announcement WHERE id='$id'");
         $announcemet_num   = $DB->sql_num_rows($announcemet_query);
         $announcemet_row   = $DB->sql_fetch_array($announcemet_query);
		 
         $SF->html_title_page($SF->SafeOutPuts($announcemet_row['title']) . ' - (Powered By MySmartBB Universal)');
		 
         if ($announcemet_num <= 0)
         {
             $SF->error('المعذرة، الإعلان الإداري المطلوب غير موجود');
         }



         $text = $SF->SafeOutPuts($announcemet_row['text']);

         $text = $SF->SmartCode_replace($text);

         $text = $SF->SmilesReplace($text);

      //   $text = nl2br($text);
         $text = stripslashes($text);

         $Smarty->assign('text',$text);
         $Smarty->assign_by_ref('announcemet_row',$announcemet_row);

         $Smarty->assign('path_bar', $SF->SafeOutPuts($announcemet_row['title']));

         $Smarty->display('announcement.tpl');
         $Smarty->display('footer.tpl');
     }


?>